class LinkNode:
    def __init__(self, data = None):
        self.data = data
        self.next = None

class LinkList:
    def __init__(self):
        self.head = LinkNode()
        self.head.next = None
    
    def create(self, e):
        t = self.head
        t.data = e[0]
        for it in e[1:]:
            x = LinkNode(it)
            t.next = x
            t = x
        t.next = None

    def dis(self):
        p = self.head
        while p != None:
            print(p.data, end=" ")
            p = p.next     
        print()

a = LinkList()
a.create([1, 2, 4, 5, 9, 100])
a.dis()
p = a.head
def positive(p):
    if p == None:
        return
    print(p.data)
    return positive(p.next)
positive(p)
def negative(p):
    if p == None:
        return
    negative(p.next)
    print(p.data)
negative(p)